package mybatis.pojo;

import java.io.Serializable;
import java.util.List;

public class Dept implements Serializable {
    private int deptno;
    private String dname;
    private String dlocation;
    private List<Emp> empList;

    public List<Emp> getEmpList() {
        return empList;
    }

    public String getDname() {
        return dname;
    }

    public String getDlocation() {
        return dlocation;
    }

    public int getDeptno() {
        return deptno;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public void setDlocation(String dlocation) {
        this.dlocation = dlocation;
    }

    public void setDeptno(int deptno) {
        this.deptno = deptno;
    }

    public void setEmpList(List<Emp> empList) {
        this.empList = empList;
    }

    @Override
    public String toString() {
        return "Dept{" +
                "deptno=" + deptno +
                ", dname='" + dname + '\'' +
                ", dlocation='" + dlocation + '\'' +
                ", empList=" + empList +
                '}';
    }

    public Dept(){}
    public Dept(int no,String dname,String dlocation,List<Emp> empList){
        setDeptno(no);
        setDname(dname);
        setDlocation(dlocation);
        setEmpList(empList);
    }
}
